﻿<ResourceDictionary
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:local="clr-namespace:Coding4Fun.Phone.Controls">

	<Style TargetType="local:AboutPersonItem">
		<Setter Property="Template">
			<Setter.Value>
				<ControlTemplate TargetType="local:AboutPersonItem">
					<Grid Margin="0,11,0,0">
						<Grid.Resources>
							<Style x:Key="rightSide" TargetType="TextBlock">
								<Setter Property="Grid.Column" Value="1" />
								<Setter Property="Margin" Value="10,0,0,5" />

							</Style>
							<Style x:Key="leftSide" TargetType="TextBlock">
								<Setter Property="HorizontalAlignment" Value="Right" />
								<Setter Property="VerticalAlignment" Value="top" />
								<Setter Property="Grid.Column" Value="0" />
								<Setter Property="FontWeight" Value="Bold" />
							</Style>
						</Grid.Resources>
						<Grid.ColumnDefinitions>
							<ColumnDefinition Width="80" />
							<ColumnDefinition />
						</Grid.ColumnDefinitions>
						<TextBlock 
                            Style="{StaticResource leftSide}"  
                            Text="{TemplateBinding Role}" />
						<StackPanel Grid.Column="1">
							<TextBlock 
                                Name="author" 
                                Style="{StaticResource rightSide}"
                                Text="{TemplateBinding AuthorName}"
                                Visibility="Collapsed" />
							<TextBlock 
                                Name="website" 
                                Style="{StaticResource rightSide}"
					            Text="{TemplateBinding WebSiteDisplay}" 
                                Visibility="Collapsed" />
							<TextBlock 
                                Name="emailAddress" 
                                Style="{StaticResource rightSide}"
                                Text="{TemplateBinding EmailAddress}" 
                                Visibility="Collapsed" />
						</StackPanel>
					</Grid>
				</ControlTemplate>
			</Setter.Value>
		</Setter>
	</Style>

</ResourceDictionary>